package dt.inlee.domain;

import java.util.Date;
import java.util.List;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * 
 * @类名： DcBout
 * @功能说明：点餐回合，
 * @作者： 研发部-鄢松涛
 * @创建日期： 2014年9月19日下午4:32:25
 * @版本：1.0
 */
@Entity
@Table(name = "DC_BOUT")
public class DcBout {
    public static final int STATUS_NOTBEGIN = 2;// 未开始
    public static final int STATUS_ING = 1;// 进行中
    public static final int STATUS_END = 0;// 已结束

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    private Integer status;// 状态：1正在进行中，0结束，2未开始
    
    @ManyToOne
    private DcBusiness business;//本轮次提供服务的商家

    @OneToMany(mappedBy = "bout")
    private List<DcOrder> orders;//当前轮次订单

    private Date startTime;// 开始时间

    private Date endTime;// 结束时间

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }
    
    public DcBusiness getBusiness() {
        return business;
    }

    public void setBusiness(DcBusiness business) {
        this.business = business;
    }


    public List<DcOrder> getOrders() {
        return orders;
    }

    public void setOrders(List<DcOrder> orders) {
        this.orders = orders;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

}
